//
//  MusicPlayerManager.h
//  HLMusicBox
//
//  Created by hulinhu on 2018/1/2.
//  Copyright © 2018年 hulinhu. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <AVFoundation/AVFoundation.h>

typedef enum : NSUInteger {
    RepeatPlayMode,   // 顺序播放
    RepeatOnlyOnePlayMode,
    ShufflePlayMode,  // 随机播放
} ShuffleAndRepeatState;



@interface MusicPlayerManager : NSObject

+ (id)shareInstance;

@property (nonatomic,strong) AVPlayer *play;
@property (nonatomic,strong) AVPlayerItem *playItem;

@property (nonatomic,assign) NSInteger playingIndex;
@property (nonatomic,assign) ShuffleAndRepeatState shuffleAndRepeatState;



-(void) setPlayItem: (NSString *)songURL;
-(void) setPlay;
-(void) startPlay;
-(void) stopPlay;
-(void) play: (NSString *)songURL;


@end
